/**
 * Created with JetBrains WebStorm.
 * User: P0018766
 * Date: 13-1-23
 * Time: 下午4:54
 * To change this template use File | Settings | File Templates.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var ShopSchema = new Schema({
    shop_name:{ type:String },
    shop_desc:{ type:String },
    phone:{ type:String },
    owner:{ type:Schema.ObjectId,ref: 'User'},
    address:{ type:String },
    least_price_send:{ type:Number },
    rating:{ type:Number },
    dishes:[
    	{
    		name:String,
    		pic:String,
    		desc:String,
    		price:Number
    	},
    ],
    comments:[ {type:Schema.ObjectId,ref:'comments'}]
});

mongoose.model('Shop', ShopSchema);
